Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new Clippy lints #435

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Fix new Clippy lints #435

merged 3 commits into from
Jul 29, 2024

Conversation

newpavlov
Copy link
Member

No description provided.

unsafe fn shuffle(a: __m128i, b: __m128i, i: usize) -> __m128i {
let a: [u64; 2] = mem::transmute(a);
let b: [u64; 2] = mem::transmute(b);
mem::transmute([a[i], b[0]])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function conveys the intent better and gets properly compiled into shufpd and unpcklpd instructions after inlining.

@newpavlov newpavlov merged commit 4ae792e into master Jul 29, 2024
39 checks passed
@newpavlov newpavlov deleted the clippy2 branch July 29, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant